package alf.mapping.view.activity;

import alf.mapping.view.visuals.EditorEngine;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;

public class SettingsActivity extends PreferenceActivity 
implements SharedPreferences.OnSharedPreferenceChangeListener {
	public static final String THEME_PATH = "pref_themes_dir";
	@Override
	public void onCreate(Bundle savedInstanceState) { 
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.preferences);
		getPreferenceScreen().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);
	}
	public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { 
		String value = sharedPreferences.getString(key,null);
		EditorEngine.getInstance().onPreferencesChanged(key,value);
	}

}
